﻿Namespace Essential
    Public Class QutoaArray
        Inherits System.Collections.ArrayList
        Dim quotavar As Integer
        Public Sub New(ByVal ArrayQuota As Integer)
            Quota = ArrayQuota
        End Sub
        Property Quota() As Integer
            Get
                Return quotavar
            End Get
            Set(ByVal value As Integer)
                quotavar = value
            End Set
        End Property
        Public Overrides Function Add(ByVal value As Object) As Integer
            If MyBase.Count = Quota Then
                MyBase.RemoveAt(0)
                Return MyBase.Add(value)
            Else
                Return MyBase.Add(value)
            End If
        End Function
    End Class
End Namespace